package main.entity;

import java.io.Serializable;
import java.sql.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Transient;
import javax.validation.constraints.Past;

import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.stereotype.Component;

@Component
//@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Entity(name="threads")
public class ThreadsVO implements Serializable {
	/**
	 * 2016-10-24-pm
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "threads_ID", unique = true, nullable = true)
	private Integer threadsID;
	@NotEmpty
	@Column(name="threads_name", unique=true, nullable = true, length=64)
	private String threadsName;
	@NotEmpty
	@Column(name="threads_content", unique=true, nullable = true, length=64)
	private String threadsContent;
	@Column(name="uID", nullable = true)
	private Integer uID;
	@Column(name="chnl_ID", nullable = true)
	private Integer channelID;
	@Column(name="publish_time",nullable=true)
	@Past
	private Date pubTime;
	@Column(name="update_time",nullable=true)
	@Past
	private Date updtTime;
	@Column(name="delete_time",nullable=true)
	@Past
	private Date dltTime;
	@Transient
	private String unm;
	@Transient
	private Integer replyCount;
	
	public String getThreadsContent() {
		return threadsContent;
	}
	public void setThreadsContent(String threadsContent) {
		this.threadsContent = threadsContent;
	}
	public String getUnm() {
		return unm;
	}
	public void setUnm(String unm) {
		this.unm = unm;
	}
	public Integer getReplyCount() {
		return replyCount;
	}
	public void setReplyCount(Integer replyCount) {
		this.replyCount = replyCount;
	}
	public Integer getThreadsID() {
		return threadsID;
	}
	public void setThreadsID(Integer threadsID) {
		this.threadsID = threadsID;
	}
	public String getThreadsName() {
		return threadsName;
	}
	public void setThreadsName(String threadsName) {
		this.threadsName = threadsName;
	}
	public Integer getuID() {
		return uID;
	}
	public void setuID(Integer uID) {
		this.uID = uID;
	}
	public Date getPubTime() {
		return pubTime;
	}
	public void setPubTime(Date pubTime) {
		this.pubTime = pubTime;
	}
	public Date getUpdtTime() {
		return updtTime;
	}
	public void setUpdtTime(Date updtTime) {
		this.updtTime = updtTime;
	}
	public Date getDltTime() {
		return dltTime;
	}
	public void setDltTime(Date dltTime) {
		this.dltTime = dltTime;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	public Integer getChannelID() {
		return channelID;
	}
	public void setChannelID(Integer channelID) {
		this.channelID = channelID;
	}
	
}
